package com.site;

import com.site.config.AppConfig;
import com.site.parser.utils.ParserType;
import com.site.service.ParserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * Created by shengquan.wu on 2018/3/30.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = AppConfig.class)
public class ServiceLocatorFactoryExample {

    @Autowired
    private ParserService parserService;

    @Test
    public void testParserFactory(){
        parserService.doParse("abcd", ParserType.JSON);
        parserService.doParse("abcd", ParserType.XML);
    }




}
